package com.ruoyi.system.enums;

import lombok.Getter;

/**
 * @author : anxinr
 * @date : 2023/4/30 17:41
 */
@Getter
public enum ChangeStateEnum {
    CHANGE_TOBE_WORKER_APPLY(0,"待工作人员审批"),
    CHANGE_TOBE_ADMIN_APPLY(1,"待管理员审批"),
    CHANGE_SUCCESS(2,"已通过"),
    ;
    private String message ;
    private Integer code ;
    ChangeStateEnum(Integer code ,String message){
        this.code = code ;
        this.message = message ;
    }

    public static String getMessageByCode(Integer code){
        ChangeStateEnum[] values = ChangeStateEnum.values();
        for (ChangeStateEnum value : values) {
            if (value.getCode().equals(code)){
                return value.getMessage() ;
            }
        }
        return "未知" ;
    }
}
